#!/bin/bash

while :
do
  sleep 60
  nvidia-smi | head -n 22 | tail -n 1 | tr -s ' '  | cut -d ' ' -f 9 >> gpu_mem.txt
done
